<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php if (equipment() == 1) : ?>

<?php else : ?>

<?php endif; ?>
<div class="banner">
    <div class="banner-wrapper">
        <a style="background-image:url('https://blog.satri.cn/usr/uploads/common-bg.jpg')">
            <h2 style="letter-spacing:2px;">日志
                <br>
                <p style="font-size:15px;letter-spacing:1px;">三十功名尘与土，八千里路云和月</p>
            </h2>
        </a>
    </div>
</div>



<div id="body">
    <div class="container" style="padding:0 10px;">
        <div class="row">
            <div class="content" id="main" role="main">
                <?php while ($this->next()) : ?>
                    <div class="post_all" itemscope itemtype="http://schema.org/BlogPosting">
                        <div class="post_title_all">
                            <h2><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
                        </div>
                        <div class="post_preview_all">
                            <div class="desc">
                                <a href="<?php $this->permalink() ?>" style="color:#222;">
                                     <?php if (equipment() == 1) : ?>
                                        <?php
                                        if ($this->attachments(1)->attachment->isImage) {
                                            $this->excerpt(45, '...');
                                        } else {
                                            $this->excerpt(60, '...');
                                        }
                                        ?>
                                        <? else : ?>
                                          <?php
                                        if ($this->attachments(1)->attachment->isImage) {
                                            $this->excerpt(80, '...');
                                        } else {
                                            $this->excerpt(130, '...');
                                        }
                                        ?>
                                        <? endif; ?>
                                </a>
                            </div>
                            <!--如是有图文章，则显示缩略图-->
                            <?php if ($this->attachments(1)->attachment->isImage) : ?>
                                <div class="post_img" style="background-image:url('<?php $this->attachments(1)->attachment->url(); ?>')"></div>
                            <?php endif; ?>
                        </div>
                        <div class="post_meta_all">
                            <span class="post_date"><?php $this->date(); ?></span>
                            <span class="post_views" style="color:#3354AA;"><?php //$this->this(',');
                                                                            ?><?php echo "日志"; //$this->this(',');
                                                                                ?></span>
                            <span class="post_comment"><?php echo $this->charactersNum() . '字'; //$this->commentsNum('0 评论', '1 评论', '%d 评论');
                                                        ?></span>
                        </div>
                    </div>
                <?php endwhile; ?>
                <?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>

            </div>
        </div>
    </div>
</div>
</div>
<!-- end main -->
<?php $this->need('footer.php'); ?>